#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

void Insertion_Sorting(int arr[], int len)
{
    for (int i = 1; i < len; i++)
    {
        int tmp = arr[i];
        int j = i - 1;
        for (; j >= 0; j--)
        {
            if (arr[j] > tmp)
                arr[j + 1] = arr[j];
            else
                break;

        }
        arr[j + 1] = tmp;
    }
}


int main()
{
    int arr[] = { 5,6,4,3,2,1 };
    Insertion_Sorting(arr, 6);
    for (int i = 0; i < 6; i++)
        printf("%d ", arr[i]);
    return 0;
}